It is the line number in the program where the exception occured.
Please keep in mind
that it is Java bytecode that executes,
not the
Java source code.
However the bytecode file contains information about how lines of
source code and bytecodes correspond.
The other line numbers
are not very useful for us because they refer to the source code
for the parseInt()
method (written at Sun Microsystems)
that is not part of our file.
Some exception types are checked exceptions, which means that a method must do something about them. The compiler checks each method to be sure that it does. There are two things a method can do with a checked exception:
catch{}
block, orthrow
the exception to the caller of the method.
For example, an IOException
is a checked exception.
In the past your programs have done something like this:
public class DoesIO
{
public static void main ( String[] a ) throws IOException
{
BufferedReader stdin =
new BufferedReader ( new InputStreamReader( System.in ) );
// More Java statements ...
}
}
The reserved word throws says that this method
does not catch the IOException
,
and that if one occurs in this method it will be thrown to the
method that called this one.
(In this example, it will be thrown back to the Java runtime system.)